home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / contrib / www_and_frame-README < prev    next >
Encoding:
Text File  |  1992-08-20  |  9.2 KB  |  247 lines

  1.  
  2.                              WWW MEETS FRAMEMAKER
  3.                                        
  4.    I have just completed the first steps in integrating FrameMaker and the
  5.    World Wide Web. You can now create, read, modify, and write web documents
  6.    using FrameMaker. Soon, you should be able to use FrameMaker as a global
  7.    hypertext browser.
  8.    
  9.                                        Daniel W. Connolly <connolly@convex.com>
  10.                                                                                
  11.                               THEORY OF OPERATION
  12.                                        
  13.    FrameMaker supports an interchange format[1]  and an integrated conversion
  14.    facility. See p. D-16 of FrameMaker Reference[2]  for full documentation.
  15.    
  16. Reading HTML
  17.  
  18.    Basically, whenever you open or save a file (in MIF format), if the filename
  19.    matches a suffix list, Frame invokes a shell script that can convert the
  20.    file on the fly.
  21.    
  22.    I modified the supplied MifRead[3]  script to recognize HTML. Files ending
  23.    with .html are filtered them through  fix-html.pl[4] , which brings
  24.    conventional HTML files into SGML conformance. Then sgmls parses the file
  25.    using  html.dtd[5] . (sgmls does a pretty good job of tolerating errors in
  26.    SGML instances.)
  27.    
  28.    Then html2mml.l[6]  and the xlisp interpreter convert the sgmls output to
  29.    Maker Markup Language. Finally, MifRead calls FrameUs mmltomif to generate
  30.    the MIF file that FrameMaker will read.
  31.    
  32. Writing HTML
  33.  
  34.    I modified the supplied MifWrite[7]  to convert MIF files saved with the
  35.    .html extension to HTML. The xlisp program mif2html.l[8]  does the whole
  36.    conversion.
  37.    
  38. Hypertext Constructs in Frame and WWW
  39.  
  40.    FrameMaker supports hypertext references using markers with MType=8
  41.    (Hypertext in the dialog box.) The active text is everyting from the marker
  42.    to the next font change before and after the marker.
  43.    
  44.    Associated with the marker is a text string. FrameMaker defines a set of
  45.    hypertext commands. See p. 3-8 of FrameMaker Reference[9]  for details.
  46.    
  47.    Three of the commands are supported by the www_and_frame package: gotolink,
  48.    newlink, and message.
  49.    
  50.    The syntax of gotolink is
  51.    
  52. gotolink filename:linkspec
  53.  
  54. gotolink linkspec
  55.  
  56. gotolink filename:firstpage
  57.  
  58.    which are translated to anchor start tags of the form:
  59.    
  60. <A HREF="file:filename#linkspec">
  61.  
  62. <A HREF="#linkspec">
  63.  
  64. <A HREF="file:filename">
  65.  
  66.    The syntax of newlink is
  67.    
  68. newlink linkspec
  69.  
  70.    which I translated to
  71.    
  72. <A NAME="linkspec">
  73.  
  74.    The syntax of message is
  75.    
  76. message clientname string
  77.  
  78.    which, if clientname is www, I translated to
  79.    
  80. <A HREF="string">
  81.  
  82.    The catch is that you have to put the hypertext marker at the beginning of
  83.    the anchor text. If you put it in the middle, Frame will recoginze the whole
  84.    anchor, but these tools will only recognize the text between the marker and
  85.    the next font change.
  86.    
  87.    The inverse translations arenUt as fully functional. They currently map
  88.    
  89. <A NAME="n" HREF="h">
  90.  
  91.    to
  92.    
  93. message www h
  94.  
  95.    The result is that target anchors are generally lost on input. This should
  96.    be fixed shortly.
  97.    
  98.                                  INSTALLATION
  99.                                        
  100. The www_and_frame package
  101.  
  102.    The www_and_frame.tar.Z file will be available via anonymous ftp shortly
  103.    from info.cern.ch in the pub/WWW/src directory.
  104.    
  105.    The command
  106.    
  107. zcat www_and_frame.tar.Z | tar xvf -
  108.  
  109.    should properly install the package in a directory called .fminit2.0.
  110.    
  111. The LISP interpreter: xlisp by David Betz
  112.  
  113.    Grab export.lcs.mit.edu:/contrib/winterp/xlisp/xlisp-2.1.almy.tar.Z via
  114.    anonymous FTP. Then apply the patches in diffs_from_almy21. These patches
  115.    prevent xlisp from writing diagnostics to stdout where they will be mixed in
  116.    with conversion output.
  117.    
  118.    Then build it using the included directions. You may have to tweak it a
  119.    little for your system.
  120.    
  121.    IUd like to make this package a little more ANSI/POSIX conformant if I get
  122.    time. But for now, youUll have to do the typical Makefile editing.
  123.    
  124. The SGML parser: sgmls by James Clark
  125.  
  126.    Grab ifi.uio.no:/pub/SGML/SGMLS/sgmls-0.8.tar or
  127.    ftp.uu.net:/pub/text-processing/sgml/sgmls-0.8.tar.Z
  128.    
  129.    This package is extremely high quality. It includes a configure shell
  130.    script, and it is largely ANSI/POSIX compliant. It builds without
  131.    modification on all the systems IUve tried.
  132.    
  133.                                   TRY IT OUT!
  134.                                        
  135. Load the test file into FrameMaker
  136.  
  137.    Be sure you have the following requirements met first:
  138.    
  139.       The .fminit2.0 directory from the www_and_frame package is in the current
  140.       directory or in your home directory.
  141.       
  142.       The  suffixes file in that directory has an entry for html.
  143.       
  144.       The  MifRead shell script in the fminit directory checks for html
  145.       processing.
  146.       
  147.       The fix-html.pl perl script is executable and in your $PATH.
  148.       
  149.       The sgmls parser is executable and in your $PATH.
  150.       
  151.       The html.dtd file is in the current directory or accessible via the
  152.       SGML_PATH envariable. (See the sgmls man page for details.)
  153.       
  154.       The html2mml.l lisp program is in the current directory.
  155.       
  156.    Then start FrameMaker, chose open from the File menu and select  test.html.
  157.    FrameMaker will consult the suffixes file, and upon finding the html entry,
  158.    it will run MifRead. MifRead will invoke fix-html.pl to bring test.html into
  159.    SGML conformance. Then it will invoke sgmls to parse the file, and
  160.    html2mml.l to convert the parsed SGML to Maker Markup Language. Finally,
  161.    mmltomif is invoked to build an importable file.
  162.    
  163.    You should be able to edit the file normally. Use only the paragraph tags in
  164.    the catalog. You can, however, change any attributes of those tags.
  165.    
  166.    You can add hypertext links by adding FrameMaker hypertext markers. For the
  167.    marker text, the "gotolink foo:bar" and "newlink bar" syntaxes are
  168.    supported. Plus, use "message www scheme://host/path#anchor" for full WWW
  169.    addresses.
  170.    
  171.    You will have to lock the file to use the hypertext links interactively.
  172.    (use ESC-F-l-k to lock/unlock the file.)
  173.    
  174. Save the test file in HTML format
  175.  
  176.    When you want to save the file, be sure these requirements are met:
  177.    
  178.       The  MifWrite shell script is in the .fminit directory and checks for
  179.       html processing.
  180.       
  181.       The xlisp interpreter is executable and in your $PATH.
  182.       
  183.       The mif2html.l lisp program is in the .fminit2.0 directory.
  184.       
  185.    Then just chose Save As... and be sure the extension is .html. Click the
  186.    Maker Interchange Format option, and click OK. Frame will invoke MifWrite,
  187.    which will invoke the mif2html.l lisp program.
  188.    
  189.    The resulting file should be acceptable to the www browsers.
  190.    
  191.                             UPDATES TO THE HTML DTD
  192.                                        
  193.    For the functionality that I implemented, no changes to the WWW code are
  194.    necessary. HTML files and programs that generate HTML do require changes.
  195.    
  196.    The FrameMaker integration is based on the premise that WWW will become an
  197.    SGML compliant application. I am using the DTD that I proposed recently[10]
  198.    with some modifications  to closely parallel HTML.c from the distributed
  199.    code. I also consulted the proposed HTML2 definition[11] .
  200.    
  201.    The fix-html.pl[12]  script should bring most existing HTML files into
  202.    compliance.
  203.    
  204.                                FUTURE DIRECTIONS
  205.                                        
  206.    The documentation for FrameMaker includes Integrating Applications with
  207.    FrameMaker, which desciribes a mechanism where arbitrary RPC clients can be
  208.    invoked from hypertext commands.
  209.    
  210.    That is, the incantation
  211.    
  212. message www http://info.cern.ch/hypertext/WWW/MarkUp/HTML2.html
  213.  
  214.    could make an RCP call to a WWW client that would retrieve the indicated
  215.    document and instruct FrameMaker to display that file.
  216.    
  217.    This would turn FrameMaker into a global hypertext browser.
  218.    
  219.                                      TO DO
  220.                                        
  221.       Sometimes FrameMaker hides the paragraph tag in with the paragraph
  222.       formatting in the MIF file. mif2html.l fails to recognize this situation.
  223.       Hence the bogus  tag at the beginning of documents.
  224.       
  225.       Names of anchors are lost on conversion to MIF. This is just laziness.
  226.       
  227.       I didnUt convert FrameUs extended ASCII character set to anything
  228.       sensible. Quotes will look funny.
  229.       
  230.       Traditionally, SGML systems verify documents on input and assume validity
  231.       on input. This system does the reverse. I should verify output documents.
  232.       
  233.       I once had a keyboard macro rigged up for saving as MIF. ItUs kind of a
  234.       pain to make about five clicks every time you want to save.
  235.       
  236.                                  BIBLIOGRAPHY
  237.                                        
  238.   MIF                    MIF ReferenceFrame Technology Corporation1010 Rincon
  239.                          CircleSan Jose, California 95131Part Number
  240.                          41-01037-00April 1991
  241.                          
  242.   FrameMaker Reference   FrameMaker ReferenceFrame Technology Corporation1010
  243.                          Rincon CircleSan Jose, California 95131Part Number
  244.                          41-00524-00Septermber 1990
  245.                          
  246.   
  247.